# makefile 编写参考 https://makefiletutorial.com/
OUT_DIR = build

run: dispatcher judger
	cd $(OUT_DIR) && ./dispatcher

dispatcher: $(OUT_DIR)
	g++ -std=c++17 -Werror -Wall -o $(OUT_DIR)/$@ src/dispatcher.cpp third_party/mongoose.c third_party/mjson.c -I third_party

judger: $(OUT_DIR)
	g++ -std=c++17 -Werror -Wall -o $(OUT_DIR)/$@ src/judger.cpp third_party/mongoose.c third_party/mjson.c -I third_party

$(OUT_DIR):
	mkdir $(OUT_DIR)